<?php
	header("Content-type:text/html;charset=utf-8");
	
	$name = $_POST["phone"];
	
	$conn = mysql_connect("localhost","root","root");
	
	mysql_select_db("2107");
	
	$result = mysql_query("select * from user where phone = '$name'",$conn);
	
	if(mysql_num_rows($result) == 1){
		//在参数ajax的php文件中,echo是返回数据的关键字
		echo "用户已注册";
	}else{
		echo "可以注册";
	}
?>